package com.freemyleft.left.left_app.mian.index.my.mywallet.classfree;

import com.freemyleft.left.left_app.R;
import com.freemyleft.left.zapp.ui.recycler.MultipleItemEntity;
import com.freemyleft.left.zapp.ui.recycler.MultipleRecyclerAdapter;
import com.freemyleft.left.zapp.ui.recycler.MultipleViewHolder;

import java.util.List;

public class ClassFreeAdapter extends MultipleRecyclerAdapter {
    public static final  int CLASS_FREE_TYPE=8899;
    protected ClassFreeAdapter(List<MultipleItemEntity> data) {
        super(data);
        addItemType(CLASS_FREE_TYPE, R.layout.item_class_free);
    }

    @Override
    protected void convert(MultipleViewHolder holder, MultipleItemEntity entity) {
        super.convert(holder, entity);
        String name =entity.getField(ClassFreeFlies.NAME);
        String price=entity.getField(ClassFreeFlies.PRICE);
        String date=entity.getField(ClassFreeFlies.DATE);
        holder.setText(R.id.tv_name,name);
        holder.setText(R.id.tv_price,price);
        holder.setText(R.id.tv_date,date);
    }

    public enum ClassFreeFlies{
        NAME,
        PRICE,
        DATE
    }
}
